import axios from "axios"
// function login(data){
//     return axios.post('/admin/login',data)
// }
// 登录
let login = (data) => axios.post('/admin/login', data);
// 注册
let isRepeat = (data) => axios.post('/admin/check/username', data);
let register = (data) => axios.post('/admin/register', data);
//列表
// let list = () => axios.get('/admin/list', { params: {pagesize: 10} });
//简化
// let list = (data) => axios.get('/admin/list', { params: data });
//简化
let list = (params) => axios.get('/admin/list', { params });
//删除
let remove = (data) => axios.post('/admin/remove', data);
//修改
let edit = (data) => axios.post('/admin/info', data);
//获取管理员信息
let info = (params) => axios.get('/admin/info', { params });

export default {
    login, isRepeat, register, list, remove, edit, info
}